package com.rocksea.app.entry;

import android.graphics.Bitmap;
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by 吴志华 on 2017/10/16.
 *
 */

public class ImageInfo implements Parcelable
{

    private String time;
    private String planNum;
    private String pileNo;
    private String remake;
    private byte[] data;
    private Bitmap bitmap;
    private int testType;
    private long pileId;

    //添加判断是否为波列图
    private String sectionId;
    private byte isSonicWave;

    public ImageInfo()
    {
    }

    protected ImageInfo(Parcel in) {
        time = in.readString();
        planNum = in.readString();
        pileNo = in.readString();
        remake = in.readString();
        data = in.createByteArray();
        testType = in.readInt();
        pileId = in.readLong();
        bitmap = in.readParcelable(Bitmap.class.getClassLoader());
    }
    public static final Creator<ImageInfo> CREATOR = new Creator<ImageInfo>() {
        @Override
        public ImageInfo createFromParcel(Parcel in) {
            return new ImageInfo(in);
        }

        @Override
        public ImageInfo[] newArray(int size) {
            return new ImageInfo[size];
        }
    };

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getPlanNum() {
        return planNum;
    }

    public void setPlanNum(String planNum) {
        this.planNum = planNum;
    }

    public String getPileNo() {
        return pileNo;
    }

    public void setPileNo(String pileNo) {
        this.pileNo = pileNo;
    }

    public long getPileId() {
        return pileId;
    }

    public void setPileId(long pileId) {
        this.pileId = pileId;
    }

    public String getRemake() {
        return remake;
    }

    public void setRemake(String remake) {
        this.remake = remake;
    }

    public byte[] getData() {
        return data;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public int getTestType() {
        return testType;
    }

    public void setTestType(int testType) {
        this.testType = testType;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(time);
        dest.writeString(planNum);
        dest.writeString(pileNo);
        dest.writeString(remake);
        dest.writeByteArray(data);
        dest.writeInt(testType);
        dest.writeLong(pileId);
        dest.writeParcelable(bitmap, flags);
    }

    public Bitmap getBitmap() {
        return bitmap;
    }

    public void setBitmap(Bitmap bitmap) {
        this.bitmap = bitmap;
    }
}
